Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rustc_codegen_llvm: always set AlwaysPreserve on all debuginfo variables #68881

Merged
merged 1 commit into from
Feb 9, 2020

Conversation

eddyb
Copy link
Member

@eddyb eddyb commented Feb 6, 2020

Making this depend on the optimization level appears to have been a copy-paste mistake (other LLVM functions called in this module also take a bool argument, but there it means something unrelated).
Also see #8855 (comment).

I don't believe we have any reason to let LLVM omit user variables from DWARF, and we were already setting this to true when LLVM could optimize them away, so this PR should have no effect anyway.

r? @michaelwoerister or @nagisa cc @hanna-kruppe @nikomatsakis

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Feb 6, 2020
@eddyb
Copy link
Member Author

eddyb commented Feb 6, 2020

@bors try @rust-timer queue

@rust-timer
Copy link
Collaborator

Awaiting bors try build completion

@bors
Copy link
Contributor

bors commented Feb 6, 2020

⌛ Trying commit b82f6c5 with merge aa7e872...

bors added a commit that referenced this pull request Feb 6, 2020
rustc_codegen_llvm: always set AlwaysPreserve on all debuginfo variables

Making this depend on the optimization level appears to have been a copy-paste mistake (other LLVM functions called in this module also take a `bool` argument, but there it means something unrelated).
Also see #8855 (comment).

I don't believe we have any reason to let LLVM omit user variables from DWARF, and we were already setting this to `true` when LLVM *could* optimize them away, so this PR should have no effect anyway.

r? @michaelwoerister or @nagisa cc @rkruppe @nikomatsakis
@bors
Copy link
Contributor

bors commented Feb 6, 2020

☀️ Try build successful - checks-azure
Build commit: aa7e872 (aa7e872e9bbf374646b4aed74298fb7f90137f36)

@rust-timer
Copy link
Collaborator

Queued aa7e872 with parent 333c32a, future comparison URL.

@nagisa
Copy link
Member

nagisa commented Feb 6, 2020

r=me given no major perf regressions. Doubt there will be any tho.

@cuviper
Copy link
Member

cuviper commented Feb 6, 2020

Does this have much impact on the actual optimized codegen with/without debuginfo? IMO, the ideal is that debuginfo has zero effect on codegen, just makes a best effort to track and describe it after the fact.

@rust-timer
Copy link
Collaborator

Finished benchmarking try commit aa7e872, comparison URL.

@eddyb
Copy link
Member Author

eddyb commented Feb 6, 2020

@cuviper This only affects DWARF output, not codegen.
So instead of debuginfo variables being gone, you will see <optimized out> in the debugger.

Also note that the wrong code set it to true anyway when optimizations were enabled, so there's nothing changed in that case.

@cuviper
Copy link
Member

cuviper commented Feb 6, 2020

Sounds good, thanks!

@eddyb
Copy link
Member Author

eddyb commented Feb 6, 2020

syn-opt can't possibly be affected by this, must be noise.

@bors r=nagisa

@bors
Copy link
Contributor

bors commented Feb 6, 2020

📌 Commit b82f6c5 has been approved by nagisa

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 6, 2020
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request Feb 8, 2020
…agisa

rustc_codegen_llvm: always set AlwaysPreserve on all debuginfo variables

Making this depend on the optimization level appears to have been a copy-paste mistake (other LLVM functions called in this module also take a `bool` argument, but there it means something unrelated).
Also see rust-lang#8855 (comment).

I don't believe we have any reason to let LLVM omit user variables from DWARF, and we were already setting this to `true` when LLVM *could* optimize them away, so this PR should have no effect anyway.

r? @michaelwoerister or @nagisa cc @rkruppe @nikomatsakis
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request Feb 8, 2020
…agisa

rustc_codegen_llvm: always set AlwaysPreserve on all debuginfo variables

Making this depend on the optimization level appears to have been a copy-paste mistake (other LLVM functions called in this module also take a `bool` argument, but there it means something unrelated).
Also see rust-lang#8855 (comment).

I don't believe we have any reason to let LLVM omit user variables from DWARF, and we were already setting this to `true` when LLVM *could* optimize them away, so this PR should have no effect anyway.

r? @michaelwoerister or @nagisa cc @rkruppe @nikomatsakis
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request Feb 9, 2020
…agisa

rustc_codegen_llvm: always set AlwaysPreserve on all debuginfo variables

Making this depend on the optimization level appears to have been a copy-paste mistake (other LLVM functions called in this module also take a `bool` argument, but there it means something unrelated).
Also see rust-lang#8855 (comment).

I don't believe we have any reason to let LLVM omit user variables from DWARF, and we were already setting this to `true` when LLVM *could* optimize them away, so this PR should have no effect anyway.

r? @michaelwoerister or @nagisa cc @rkruppe @nikomatsakis
bors added a commit that referenced this pull request Feb 9, 2020
Rollup of 5 pull requests

Successful merges:

 - #68738 (Derive Clone + Eq for std::string::FromUtf8Error)
 - #68742 (implement AsMut<str> for String)
 - #68881 (rustc_codegen_llvm: always set AlwaysPreserve on all debuginfo variables)
 - #68911 (Speed up the inherent impl overlap check)
 - #68913 (Pretty-print generic params and where clauses on associated types)

Failed merges:

r? @ghost
@bors bors merged commit b82f6c5 into rust-lang:master Feb 9, 2020
@eddyb eddyb deleted the always-preserve-dbg-vars branch February 9, 2020 22:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants